package com.goldfish666.remote_control.entity.airConditioner;


import com.goldfish666.remote_control.entity.common.Device;
import com.goldfish666.remote_control.enums.RunningMode;
import lombok.*;
import lombok.experimental.SuperBuilder;

import javax.persistence.*;

@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Inheritance(strategy = InheritanceType.JOINED)
//@BeanCopySource(source = InputDto.class, features = {CopyFeature.IGNORE_ALL_NULL_SOURCE_VALUE})
public class AirConditioner extends Device {

    /**
     * 当前模式
     */
    private RunningMode runningMode;

    /**
     * 制冷状态
     */
    @OneToOne
    private CoolState coolState;

    /**
     * 除湿状态
     */
    @OneToOne
    private DryState dryState;

    /**
     * 加热状态
     */
    @OneToOne
    private HeatState heatState;

    @ManyToOne
    private AirConditionerModel model;
}
